CREATE TABLE [dbo].[TTUSER_CNBA]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[NU_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTUSER_CN__NU_CO__1DC6443F] DEFAULT ((0)),
[CO_USUA] [dbo].[TD_VC_008] NOT NULL,
[ST_MANT_INEG] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTUSER_CN__ST_MA__1EBA6878] DEFAULT ('N'),
[ST_GENE_CHEQ] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTUSER_CN__ST_GE__20A2B0EA] DEFAULT ('N'),
[ST_REPO] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTUSER_CN__ST_RE__228AF95C] DEFAULT ('N'),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTUSER_CN__CO_US__247341CE] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTUSER_CN__FE_US__25676607] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTUSER_CN__CO_US__265B8A40] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTUSER_CN__FE_US__274FAE79] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTUSER_CNBA] WITH NOCHECK ADD CONSTRAINT [CK__TTUSER_CN__ST_GE__2196D523] CHECK NOT FOR REPLICATION (([ST_GENE_CHEQ]='N' OR [ST_GENE_CHEQ]='S'))
GO
ALTER TABLE [dbo].[TTUSER_CNBA] WITH NOCHECK ADD CONSTRAINT [CK__TTUSER_CN__ST_MA__1FAE8CB1] CHECK NOT FOR REPLICATION (([ST_MANT_INEG]='N' OR [ST_MANT_INEG]='S'))
GO
ALTER TABLE [dbo].[TTUSER_CNBA] WITH NOCHECK ADD CONSTRAINT [CK__TTUSER_CN__ST_RE__237F1D95] CHECK NOT FOR REPLICATION (([ST_REPO]='N' OR [ST_REPO]='S'))
GO
ALTER TABLE [dbo].[TTUSER_CNBA] ADD CONSTRAINT [PK__TTUSER_C__7EA482C151EFF3BB] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC], [NU_CORR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTUSER_CNBA] ADD CONSTRAINT [FK__TTUSER_CNBA__0040CE50] FOREIGN KEY ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC]) REFERENCES [dbo].[TMCNTA_BANC] ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC])
GO
